package com.yanghx.product.excception;

import com.yanghx.product.enums.ResultEnum;

/**
 * @author yangHX
 * createTime  2019/9/12 9:13
 */
public class ProductException extends RuntimeException {


    private Integer code;

    public ProductException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
